cmake_minimum_required(VERSION 3.8)
project(ItcUartService)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
link_directories(./lib)

set(SOURCE_FILES main.cpp uart.h uart.c modp_base64/modp_b64_data.h
        modp_base64/modp_b64.h modp_base64/modp_b64.cc base64.h base64.cpp
        json/json-forwards.h json/json.h jsoncpp.cpp tf_config.h tflib.h
        inc.h com_service.h com_service.cpp main.h define.h config.cpp config.h)
add_executable(ItcUartService ${SOURCE_FILES})


set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.65.1 COMPONENTS log thread system regex locale REQUIRED)
#${Boost_LIBRARIES} -lboost_locale

target_link_libraries(ItcUartService -I/usr/local/include -lcurl -lpthread libzlog.a ${Boost_LIBRARIES})